100 '*** Dots.bas by Will Fastie -- 19 Nov 81  Creative Computing March 1982
110 '*** Entered by Patrick Leabo Tuscon  Modified by Michael Brutman 2-9-85
120 '*** Characters above 127 added and program shortened
130 'dot height can be doubled by setting 290 to work and eraseing 280's return
140 CLEAR:DEFINT A-Z:GOSUB 10000
150 SCREENWIDTH=80:DOTSIZE=2:DHT=2:DOTCHAR=219:DOT$=STRING$(DOTSIZE,DOTCHAR)
160 DIM COLMASK(8):FOR I=0 TO 7:COLMASK(I)=2^(7-I):NEXT I
170 SCREEN 0,1:WIDTH SCREENWIDTH:KEY OFF:CLS
180 PRINT"Press the one you want to see -Space bar to quit";
185 IF INKEY$<>"" GOTO 185
190 CHAR$=INPUT$(1):CODE=ASC(CHAR$)
195 COL=INT(RND*15)+1:IF COL=4 THEN 195
196 COLOR 4,COL
197 DEF SEG:P1=2:P3=187:GOSUB 20000
200 DEF SEG=&HF000
210 IF CODE=>128 THEN BASEADR=&HE05E:CODE=CODE-128: ELSE BASEADR=&HFA6E
220 ADR = BASEADR + (CODE*8):CLS:LOCATE 6,SCREENWIDTH/2:PRINT CHAR$
230 X=(SCREENWIDTH-(8*DOTSIZE))/2:GOSUB 290
240 DEF SEG:P1=3:P2=0
245 GOSUB 20000:IF P7 <> 0 THEN 245
247 P2=1
250 IF CODE>64 AND CODE<91 THEN P3=CODE-41:GOSUB 20000:GOTO 180
260 IF CODE>96 AND CODE<123 THEN P3=CODE-73:GOSUB 20000:GOTO 180
270 IF CODE>47 AND CODE<58 THEN P3=CODE-35:GOSUB 20000:GOTO 180
275 P3=196:GOSUB 20000:GOTO 180
290 FOR R=0 TO 7:RV=PEEK(ADR+R):FOR C=0 TO 7
300 IF (RV AND COLMASK(C)) = 0 THEN 330
310 LOCATE 8+R*DHT,X+C*DOTSIZE:PRINT DOT$;
320 LOCATE 8+R*DHT+1,X+C*DOTSIZE:PRINT DOT$;
330 NEXT C:NEXT R:LOCATE 1,1:RETURN
10000 ' set up the link between speech bios and basic
10010 DIM T%(25)
10020 DIM D%(25000)
10030 DEFINT P,T
10040 P1=3:P2=1:P3=0:P4=0:P5=0:P6=0:P7=0
10050 TMP=0:TP!=0:TALK=0:I=0
10060 TP!=VARPTR(T%(0))
10070 FOR I=0 TO 49:READ TMP:POKE I+TP!,TMP:NEXT
10080 DEF SEG=&H50:P4=PEEK(16)+PEEK(17)*256:DEF SEG:RETURN
10090 DATA 85,139,236,30,139,118,18,139
10100 DATA 28,139,118,16,139,4,138,227
10110 DATA 139,118,14,139,28,139,118,10
10120 DATA 139,52,86,139,118,8,139,12
10130 DATA 139,118,12,142,28,94,205,77
10140 DATA 31,139,118,6,136,4,93,202,14,0
20000 'subroutine
20010 TP!=VARPTR(T%(0))
20020 IF TP!>32768! THEN TALK=TP!-65536!
20030 IF TP!<32768! THEN TALK=TP!
20040 CALL TALK(P1,P2,P3,P4,P5,P6,P7)
20050 RETURN
